<template>
  <!-- 通过KeepAlive实现路由组件的保活 -->
  <router-view v-slot="{ Component }">
    <keep-alive>
      <component v-if="$route.meta.keepAlive" :is="Component" />
    </keep-alive>
    <component v-if="!$route.meta.keepAlive" :is="Component" />
  </router-view>
</template>

<style lang="scss">
* {
  margin: 0px;
  padding: 0px;
}

/** 初始化导航栏的颜色变量 */
:root:root {
  --van-nav-bar-background: #f03d37;
  --van-nav-bar-icon-color: #fff;
  --van-nav-bar-title-text-color: #fff;
}
</style>
